
<%@ page import="fleet_management.MonthlyReport"%>
<!doctype html>
<html>
<head>
<meta name="layout" content="main">
<g:set var="entityName"
	value="${message(code: 'monthlyReport.label', default: 'MonthlyReport')}" />
<title><g:message code="default.list.label" args="[entityName]" /></title>
</head>
<body>
	<a href="#list-monthlyReport" class="skip" tabindex="-1"><g:message
			code="default.link.skip.label" default="Skip to content&hellip;" /></a>
	<div class="nav" role="navigation">
		<ul>
			<li><a class="home" href="${createLink(uri: '/')}"><g:message
						code="default.home.label" /></a></li>
			<li><g:link class="create" action="create">
					<g:message code="default.new.label" args="[entityName]" />
				</g:link></li>
		</ul>
	</div>
	<div id="list-monthlyReport" class="content scaffold-list" role="main">
		<h1>
			<g:message code="default.list.label" args="[entityName]" />
		</h1>
		<g:if test="${flash.message}">
			<div class="message" role="status">
				${flash.message}
			</div>
		</g:if>
		<table>
			<thead>
				<tr>

					<g:sortableColumn property="vehicleNumber"
						title="${message(code: 'monthlyReport.vehicleNumber.label', default: 'Vehicle Number')}" />

					<g:sortableColumn property="vehicleName"
						title="${message(code: 'monthlyReport.vehicleNumber.label', default: 'Vehicle Name')}" />


					<g:sortableColumn property="fuelType"
						title="${message(code: 'monthlyReport.fuelType.label', default: 'Fuel Type')}" />

					<g:sortableColumn property="servicingCost"
						title="${message(code: 'monthlyReport.servicingCost.label', default: 'Servicing Cost')}" />

					<g:sortableColumn property="maintenanceCost"
						title="${message(code: 'monthlyReport.maintenanceCost.label', default: 'Maintenance Cost')}" />

					<g:sortableColumn property="totalFuelCost"
						title="${message(code: 'monthlyReport.totalFuelCost.label', default: 'Fuel Cost')}" />

					<g:sortableColumn property="totalKmCovered"
						title="${message(code: 'monthlyReport.totalKmCovered.label', default: 'Total KM Covered')}" />

					<g:sortableColumn property="costPerKm"
						title="${message(code: 'monthlyReport.costPerKm.label', default: 'Cost/KM')}" />

					<g:sortableColumn property="totalOperatingCost"
						title="${message(code: 'monthlyReport.totalOperatingCost.label', default: 'Total Operating Cost')}" />

				</tr>
			</thead>
			<tbody>
				<g:each in="${monthlyReportInstanceList}" status="i"
					var="monthlyReportInstance">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">

						<td>
							${fieldValue(bean: monthlyReportInstance, field: "vehicleNumber")}
						</td>

						<td>
							${fieldValue(bean: monthlyReportInstance, field: "vehicleName")}
						</td>

						<td>
							${fieldValue(bean: monthlyReportInstance, field: "fuelType")}
						</td>

						<td>
							${fieldValue(bean: monthlyReportInstance, field: "servicingCost")}
						</td>

						<td>
							${fieldValue(bean: monthlyReportInstance, field: "maintenanceCost")}
						</td>

						<td>
							${fieldValue(bean: monthlyReportInstance, field: "totalFuelCost")}
						</td>

						<td>
							${fieldValue(bean: monthlyReportInstance, field: "totalKmCovered")}
						</td>
						<td>
							${fieldValue(bean: monthlyReportInstance, field: "costPerKm")}
						</td>

						<td>
							${fieldValue(bean: monthlyReportInstance, field: "totalOperatingCost")}
						</td>

					</tr>
				</g:each>
			</tbody>
		</table>
		<div class="pagination">
			<g:paginate total="${monthlyReportInstanceTotal}" />
		</div>
	</div>
</body>
</html>
